package com.fit.dao.card;

import java.util.Date;
import java.util.List;

import org.apache.tapestry5.hibernate.annotations.CommitAfter;

import com.fit.entities.card.Card;
import com.fit.entities.typeofcard.TypeOfCard;

public interface CardDAO {

	@CommitAfter
	public boolean save(Card newCard);
	

	@CommitAfter
	public boolean delete(Card card);

	@CommitAfter
	public boolean update(Card card);

	public List<Card> findAll();

	public Card findByStartDate(Date startDate);
	
	public Card findByEspireDate(Date finishDate);
	
	public Card findByCardTypeId(Long id);

	public Card findByID(Long id);
	
	public List<Card> findAllByTypeOfCard(TypeOfCard typeOfCard);

	@CommitAfter
	public boolean deleteByID(Long id);
}
